package com.yuwubao.hz_International.entities.repository;

import com.yuwubao.hz_International.entities.GiftConfigEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
 * Created by yangyu on 2018/1/25.
 */
public interface GiftConfigRepository extends JpaRepository<GiftConfigEntity, Integer>, JpaSpecificationExecutor<GiftConfigEntity> {
    @Query(nativeQuery = true, value = "SELECT * FROM gift_config ORDER BY id DESC LIMIT 1")
    GiftConfigEntity getLast();
}
